home *** CD-ROM | disk | FTP | other *** search
Makefile | 1993-01-30 | 2.5 KB | 86 lines |
- ## -*- text -*- ####################################################
- # #
- # Makefile for readline and history libraries. #
- # #
- ####################################################################
-
- # Here is a rule for making .o files from .c files that doesn't force
- # the type of the machine (like -sun3) into the flags.
- .c.o:
- $(CC) -c $(CFLAGS) $(LOCAL_INCLUDES) \
- $(READLINE_DEFINES) $(CPPFLAGS) $*.c
-
- # Destination installation directory. The libraries are copied to DESTDIR
- # when you do a `make install', and the header files to INCDIR/readline/*.h.
- DESTDIR = /gnu/lib
- INCDIR = /gnu/include
-
- # Define TYPES as -DVOID_SIGHANDLER if your operating system uses
- # a return type of "void" for signal handlers.
- TYPES = -DVOID_SIGHANDLER
-
- # Define USG as -DUSG if you are using a System V operating system.
- #USG = -DUSG
-
- # HP-UX compilation requires the BSD library.
- #LOCAL_LIBS = -lBSD
-
- # Xenix compilation requires -ldir -lx
- #LOCAL_LIBS = -ldir -lx
-
- # Comment out "-DVI_MODE" if you don't think that anyone will ever desire
- # the vi line editing mode and features. Make sure to comment out the
- # definition of VI if you remove the -DVI_MODE.
- READLINE_DEFINES = $(TYPES) -DHAVE_UNISTD_H # -DVI_MODE
-
- DEBUG_FLAGS = -O2 -fomit-frame-pointer
- LDFLAGS = $(DEBUG_FLAGS)
- CFLAGS = $(DEBUG_FLAGS) $(USG) -I.
-
- # A good alternative is gcc -traditional.
- #CC = gcc -traditional
- CC = gcc
- RANLIB = @:
- AR = ar
- RM = rm -f
- CP = cp
-
- LOCAL_INCLUDES = -I..
-
- XMALLOC_DIR = .
- XMALLOC_C = $(XMALLOC_DIR)/xmalloc.c
- XMALLOC_O = xmalloc.o
- TILDE_DIR = .
- TILDE_C = $(TILDE_DIR)/tilde.c
- TILDE_O = tilde.o
-
- CSOURCES = readline.c history.c funmap.c keymaps.c vi_mode.c \
- emacs_keymap.c vi_keymap.c $(TILDE_C)
-
- HSOURCES = readline.h chardefs.h history.h keymaps.h
- SOURCES = $(CSOURCES) $(HSOURCES)
-
- OBJECTS = readline.o vi_mode.o history.o funmap.o keymaps.o xmalloc.o tilde.o
-
- ##########################################################################
-
- all: libreadline.a
-
- libreadline.a: $(OBJECTS)
- $(RM) $@
- $(AR) cs $@ $(OBJECTS)
-
- readline: readline.h chardefs.h $(OBJECTS)
- $(CC) $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
- $(LOCAL_INCLUDES) -DTEST -o readline readline.c vi_mode.o funmap.o \
- $(TILDE_O) $(XMALLOC_O) keymaps.o history.o -L. -ltermcap
-
- readline.o: readline.c readline.h chardefs.h keymaps.h history.h
- history.o: history.c history.h
- vi_mode.o: vi_mode.c
- funmap.o: funmap.c readline.h
- keymaps.o: keymaps.c emacs_keymap.c vi_keymap.c keymaps.h chardefs.h
-
- clean:
- rm -f $(OBJECTS) *.a
-